<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var arrayTest=[23,58,41,78,1,7,0,54,3,2,67];
    function quickSort (arr){
        if(arr.length<=1){
            return arr;
        }
        var midNum=Math.floor(arr.length/2);
        var mid=arr.splice(midNum,1)[0];
        var left=[];
        var right=[];
        for(var i=0;i<arr.length;i++){
            if (arr[i] < mid) {
                left.push(arr[i]);
            } else {
                right.push(arr[i]);
            }
        }
        return quickSort(left).concat([mid],quickSort(right));
    }

    console.log(quickSort(arrayTest));
</script>
</body>
</html>